﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MUD.Lib.Objects.Users;
using MUD.Lib.Utils;

namespace MUD.Lib.Commands
{
    class roll : ICommand
    {
        public void Execute(User user, string command)
        {
            try
            {
                int numDice = int.Parse(command.NthWord(1));
                user.Write("Rolling " + numDice + " dice with target number 5: " + Dice.Roll(numDice, 5) + "successes!\r\n");
            }
            catch (Exception ex)
            {
                user.Write(ex.Message+"\r\n");
            }
        }

        public string Help()
        {
            throw new NotImplementedException();
        }
    }
}
